home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / layout / nsCSSFrameConstructor.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  52KB  |  1,024 lines

  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* ***** BEGIN LICENSE BLOCK *****
  3.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  4.  *
  5.  * The contents of this file are subject to the Mozilla Public License Version
  6.  * 1.1 (the "License"); you may not use this file except in compliance with
  7.  * the License. You may obtain a copy of the License at
  8.  * http://www.mozilla.org/MPL/
  9.  *
  10.  * Software distributed under the License is distributed on an "AS IS" basis,
  11.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  12.  * for the specific language governing rights and limitations under the
  13.  * License.
  14.  *
  15.  * The Original Code is mozilla.org code.
  16.  *
  17.  * The Initial Developer of the Original Code is
  18.  * Netscape Communications Corporation.
  19.  * Portions created by the Initial Developer are Copyright (C) 1998
  20.  * the Initial Developer. All Rights Reserved.
  21.  *
  22.  * Contributor(s):
  23.  *
  24.  * Alternatively, the contents of this file may be used under the terms of
  25.  * either of the GNU General Public License Version 2 or later (the "GPL"),
  26.  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  27.  * in which case the provisions of the GPL or the LGPL are applicable instead
  28.  * of those above. If you wish to allow use of your version of this file only
  29.  * under the terms of either the GPL or the LGPL, and not to allow others to
  30.  * use your version of this file under the terms of the MPL, indicate your
  31.  * decision by deleting the provisions above and replace them with the notice
  32.  * and other provisions required by the GPL or the LGPL. If you do not delete
  33.  * the provisions above, a recipient may use your version of this file under
  34.  * the terms of any one of the MPL, the GPL or the LGPL.
  35.  *
  36.  * ***** END LICENSE BLOCK ***** */
  37. #ifndef nsCSSFrameConstructor_h___
  38. #define nsCSSFrameConstructor_h___
  39.  
  40. #include "nsCOMPtr.h"
  41. #include "nsILayoutHistoryState.h"
  42. #include "nsIXBLService.h"
  43. #include "nsQuoteList.h"
  44. #include "nsCounterManager.h"
  45. #include "nsDataHashtable.h"
  46. #include "nsHashKeys.h"
  47. #include "plevent.h"
  48. #include "nsIEventQueueService.h"
  49. #include "nsIEventQueue.h"
  50.  
  51. class nsIDocument;
  52. struct nsFrameItems;
  53. struct nsAbsoluteItems;
  54. struct nsTableCreator;
  55. class nsStyleContext;
  56. struct nsTableList;
  57. struct nsStyleContent;
  58. struct nsStyleDisplay;
  59. class nsIPresShell;
  60. class nsVoidArray;
  61. class nsFrameManager;
  62. class nsIDOMHTMLSelectElement;
  63. class nsPresContext;
  64. class nsStyleChangeList;
  65. class nsIFrame;
  66.  
  67. struct nsFindFrameHint
  68. {
  69.   nsIFrame *mPrimaryFrameForPrevSibling;  // weak ref to the primary frame for the content for which we need a frame
  70.   nsFindFrameHint() : mPrimaryFrameForPrevSibling(nsnull) { }
  71. };
  72.  
  73. class nsFrameConstructorState;
  74. class nsFrameConstructorSaveState;
  75.   
  76. class nsCSSFrameConstructor
  77. {
  78. public:
  79.   nsCSSFrameConstructor(nsIDocument *aDocument, nsIPresShell* aPresShell);
  80.   ~nsCSSFrameConstructor(void) {}
  81.  
  82.   // Maintain global objects - gXBLService
  83.   static nsIXBLService * GetXBLService();
  84.   static void ReleaseGlobals() { NS_IF_RELEASE(gXBLService); }
  85.  
  86.   // get the alternate text for a content node
  87.   static void GetAlternateTextFor(nsIContent*    aContent,
  88.                                   nsIAtom*       aTag,  // content object's tag
  89.                                   nsXPIDLString& aAltText);
  90. private: 
  91.   // These are not supported and are not implemented! 
  92.   nsCSSFrameConstructor(const nsCSSFrameConstructor& aCopy); 
  93.   nsCSSFrameConstructor& operator=(const nsCSSFrameConstructor& aCopy); 
  94.  
  95. public:
  96.   // XXXbz this method needs to actually return errors!
  97.   nsresult ConstructRootFrame(nsIContent*     aDocElement,
  98.                               nsIFrame**      aNewFrame);
  99.  
  100.   nsresult ReconstructDocElementHierarchy();
  101.  
  102.   nsresult ContentAppended(nsIContent*     aContainer,
  103.                            PRInt32         aNewIndexInContainer);
  104.  
  105.   nsresult ContentInserted(nsIContent*            aContainer,
  106.                            nsIFrame*              aContainerFrame,
  107.                            nsIContent*            aChild,
  108.                            PRInt32                aIndexInContainer,
  109.                            nsILayoutHistoryState* aFrameState,
  110.                            PRBool                 aInReinsertContent);
  111.  
  112.   nsresult ContentRemoved(nsIContent*     aContainer,
  113.                           nsIContent*     aChild,
  114.                           PRInt32         aIndexInContainer,
  115.                           PRBool          aInReinsertContent);
  116.  
  117.   nsresult CharacterDataChanged(nsIContent*     aContent,
  118.                                 PRBool          aAppend);
  119.  
  120.   nsresult ContentStatesChanged(nsIContent*     aContent1,
  121.                                 nsIContent*     aContent2,
  122.                                 PRInt32         aStateMask);
  123.  
  124.   // Should be called when a frame is going to be destroyed and
  125.   // WillDestroyFrameTree hasn't been called yet.
  126.   void NotifyDestroyingFrame(nsIFrame* aFrame);
  127.  
  128.   nsresult AttributeChanged(nsIContent*     aContent,
  129.                             PRInt32         aNameSpaceID,
  130.                             nsIAtom*        aAttribute,
  131.                             PRInt32         aModType);
  132.  
  133.   void BeginUpdate() { ++mUpdateCount; }
  134.   void EndUpdate();
  135.  
  136.   void WillDestroyFrameTree();
  137.  
  138.   // Note: It's the caller's responsibility to make sure to wrap a
  139.   // ProcessRestyledFrames call in a view update batch.
  140.   nsresult ProcessRestyledFrames(nsStyleChangeList& aRestyleArray);
  141.  
  142.   void ProcessOneRestyle(nsIContent* aContent, nsReStyleHint aRestyleHint,
  143.                          nsChangeHint aChangeHint);
  144.   void ProcessPendingRestyles();
  145.   void PostRestyleEvent(nsIContent* aContent, nsReStyleHint aRestyleHint,
  146.                         nsChangeHint aMinChangeHint);
  147.  
  148.   // Notification that we were unable to render a replaced element.
  149.   nsresult CantRenderReplacedElement(nsIFrame* aFrame);
  150.  
  151.   // Request to create a continuing frame
  152.   nsresult CreateContinuingFrame(nsPresContext* aPresContext,
  153.                                  nsIFrame*       aFrame,
  154.                                  nsIFrame*       aParentFrame,
  155.                                  nsIFrame**      aContinuingFrame);
  156.  
  157.   // Request to find the primary frame associated with a given content object.
  158.   // This is typically called by the pres shell when there is no mapping in
  159.   // the pres shell hash table
  160.   nsresult FindPrimaryFrameFor(nsFrameManager*  aFrameManager,
  161.                                nsIContent*      aContent,
  162.                                nsIFrame**       aFrame,
  163.                                nsFindFrameHint* aHint);
  164.  
  165.   // Get the XBL insertion point for a child
  166.   nsresult GetInsertionPoint(nsIFrame*     aParentFrame,
  167.                              nsIContent*   aChildContent,
  168.                              nsIFrame**    aInsertionPoint,
  169.                              PRBool*       aMultiple = nsnull);
  170.  
  171.   nsresult CreateListBoxContent(nsPresContext* aPresContext,
  172.                                 nsIFrame*       aParentFrame,
  173.                                 nsIFrame*       aPrevFrame,
  174.                                 nsIContent*     aChild,
  175.                                 nsIFrame**      aResult,
  176.                                 PRBool          aIsAppend,
  177.                                 PRBool          aIsScrollbar,
  178.                                 nsILayoutHistoryState* aFrameState);
  179.  
  180.   nsresult RemoveMappingsForFrameSubtree(nsIFrame*              aRemovedFrame,
  181.                                          nsILayoutHistoryState* aFrameState);
  182.  
  183.   nsIFrame* GetInitialContainingBlock() { return mInitialContainingBlock; }
  184.   nsIFrame* GetPageSequenceFrame() { return mPageSequenceFrame; }
  185.  
  186. private:
  187.  
  188.   nsresult ReinsertContent(nsIContent*    aContainer,
  189.                            nsIContent*    aChild);
  190.  
  191.   nsresult ConstructPageFrame(nsIPresShell*  aPresShell, 
  192.                               nsPresContext* aPresContext,
  193.                               nsIFrame*      aParentFrame,
  194.                               nsIFrame*      aPrevPageFrame,
  195.                               nsIFrame*&     aPageFrame,
  196.                               nsIFrame*&     aPageContentFrame);
  197.  
  198.   void DoContentStateChanged(nsIContent*     aContent,
  199.                              PRInt32         aStateMask);
  200.  
  201. private:
  202.   /* aMinHint is the minimal change that should be made to the element */
  203.   void RestyleElement(nsIContent*     aContent,
  204.                       nsIFrame*       aPrimaryFrame,
  205.                       nsChangeHint    aMinHint);
  206.  
  207.   void RestyleLaterSiblings(nsIContent*     aContent);
  208.  
  209.   nsresult InitAndRestoreFrame (const nsFrameConstructorState& aState,
  210.                                 nsIContent*                    aContent,
  211.                                 nsIFrame*                      aParentFrame,
  212.                                 nsStyleContext*                aStyleContext,
  213.                                 nsIFrame*                      aPrevInFlow,
  214.                                 nsIFrame*                      aNewFrame,
  215.                                 PRBool                         aAllowCounters = PR_TRUE);
  216.  
  217.   already_AddRefed<nsStyleContext>
  218.   ResolveStyleContext(nsIFrame*         aParentFrame,
  219.                       nsIContent*       aContent);
  220.  
  221.   nsresult ConstructFrame(nsFrameConstructorState& aState,
  222.                           nsIContent*              aContent,
  223.                           nsIFrame*                aParentFrame,
  224.                           nsFrameItems&            aFrameItems);
  225.  
  226.   nsresult ConstructDocElementFrame(nsFrameConstructorState& aState,
  227.                                     nsIContent*              aDocElement,
  228.                                     nsIFrame*                aParentFrame,
  229.                                     nsIFrame**               aNewFrame);
  230.  
  231.   nsresult ConstructDocElementTableFrame(nsIContent*            aDocElement,
  232.                                          nsIFrame*              aParentFrame,
  233.                                          nsIFrame**             aNewTableFrame,
  234.                                          nsFrameConstructorState& aState);
  235.  
  236.   nsresult CreateGeneratedFrameFor(nsIFrame*             aParentFrame,
  237.                                    nsIContent*           aContent,
  238.                                    nsStyleContext*       aStyleContext,
  239.                                    const nsStyleContent* aStyleContent,
  240.                                    PRUint32              aContentIndex,
  241.                                    nsIFrame**            aFrame);
  242.  
  243.   PRBool CreateGeneratedContentFrame(nsFrameConstructorState& aState,
  244.                                      nsIFrame*                aFrame,
  245.                                      nsIContent*              aContent,
  246.                                      nsStyleContext*          aStyleContext,
  247.                                      nsIAtom*                 aPseudoElement,
  248.                                      nsIFrame**               aResult);
  249.  
  250.   nsresult AppendFrames(const nsFrameConstructorState& aState,
  251.                         nsIContent*                    aContainer,
  252.                         nsIFrame*                      aParentFrame,
  253.                         nsIFrame*                      aFrameList,
  254.                         nsIFrame*                      aAfterFrame);
  255.  
  256.   // BEGIN TABLE SECTION
  257.   /**
  258.    * ConstructTableFrame will construct the outer and inner table frames and
  259.    * return them.  Unless aIsPseudo is PR_TRUE, it will put the inner frame in
  260.    * the child list of the outer frame, and will put any pseudo frames it had
  261.    * to create into aChildItems.  The newly-created outer frame will either be
  262.    * in aChildItems or a descendant of a pseudo in aChildItems (unless it's
  263.    * positioned, in which case its placeholder will be in aChildItems).
  264.    */ 
  265.   nsresult ConstructTableFrame(nsFrameConstructorState& aState,
  266.                                nsIContent*              aContent,
  267.                                nsIFrame*                aContentParent,
  268.                                nsStyleContext*          aStyleContext,
  269.                                nsTableCreator&          aTableCreator,
  270.                                PRBool                   aIsPseudo,
  271.                                nsFrameItems&            aChildItems,
  272.                                nsIFrame*&               aNewOuterFrame,
  273.                                nsIFrame*&               aNewInnerFrame);
  274.  
  275.   nsresult ConstructTableCaptionFrame(nsFrameConstructorState& aState,
  276.                                       nsIContent*              aContent,
  277.                                       nsIFrame*                aParent,
  278.                                       nsStyleContext*          aStyleContext,
  279.                                       nsTableCreator&          aTableCreator,
  280.                                       nsFrameItems&            aChildItems,
  281.                                       nsIFrame*&               aNewFrame,
  282.                                       PRBool&                  aIsPseudoParent);
  283.  
  284.   nsresult ConstructTableRowGroupFrame(nsFrameConstructorState& aState,
  285.                                        nsIContent*              aContent,
  286.                                        nsIFrame*                aParent,
  287.                                        nsStyleContext*          aStyleContext,
  288.                                        nsTableCreator&          aTableCreator,
  289.                                        PRBool                   aIsPseudo,
  290.                                        nsFrameItems&            aChildItems,
  291.                                        nsIFrame*&               aNewFrame,
  292.                                        PRBool&                  aIsPseudoParent);
  293.  
  294.   nsresult ConstructTableColGroupFrame(nsFrameConstructorState& aState,
  295.                                        nsIContent*              aContent,
  296.                                        nsIFrame*                aParent,
  297.                                        nsStyleContext*          aStyleContext,
  298.                                        nsTableCreator&          aTableCreator,
  299.                                        PRBool                   aIsPseudo,
  300.                                        nsFrameItems&            aChildItems,
  301.                                        nsIFrame*&               aNewFrame,
  302.                                        PRBool&                  aIsPseudoParent);
  303.  
  304.   nsresult ConstructTableRowFrame(nsFrameConstructorState& aState,
  305.                                   nsIContent*              aContent,
  306.                                   nsIFrame*                aParent,
  307.                                   nsStyleContext*          aStyleContext,
  308.                                   nsTableCreator&          aTableCreator,
  309.                                   PRBool                   aIsPseudo,
  310.                                   nsFrameItems&            aChildItems,
  311.                                   nsIFrame*&               aNewFrame,
  312.                                   PRBool&                  aIsPseudoParent);
  313.  
  314.   nsresult ConstructTableColFrame(nsFrameConstructorState& aState,
  315.                                   nsIContent*              aContent,
  316.                                   nsIFrame*                aParent,
  317.                                   nsStyleContext*          aStyleContext,
  318.                                   nsTableCreator&          aTableCreator,
  319.                                   PRBool                   aIsPseudo,
  320.                                   nsFrameItems&            aChildItems,
  321.                                   nsIFrame*&               aNewFrame,
  322.                                   PRBool&                  aIsPseudoParent);
  323.  
  324.   nsresult ConstructTableCellFrame(nsFrameConstructorState& aState,
  325.                                    nsIContent*              aContent,
  326.                                    nsIFrame*                aParentFrame,
  327.                                    nsStyleContext*          aStyleContext,
  328.                                    nsTableCreator&          aTableCreator,
  329.                                    PRBool                   aIsPseudo,
  330.                                    nsFrameItems&            aChildItems,
  331.                                    nsIFrame*&               aNewCellOuterFrame,
  332.                                    nsIFrame*&               aNewCellInnerFrame,
  333.                                    PRBool&                  aIsPseudoParent);
  334.  
  335.   /**
  336.    * ConstructTableForeignFrame constructs the frame for a non-table-element
  337.    * child of a table-element frame (where "table-element" can mean rows,
  338.    * cells, etc).  This function will insert the new frame in the right child
  339.    * list automatically, create placeholders for it in the right places as
  340.    * needed, etc (hence does not return the new frame).
  341.    */
  342.   nsresult ConstructTableForeignFrame(nsFrameConstructorState& aState,
  343.                                       nsIContent*              aContent,
  344.                                       nsIFrame*                aParentFrameIn,
  345.                                       nsStyleContext*          aStyleContext,
  346.                                       nsTableCreator&          aTableCreator,
  347.                                       nsFrameItems&            aChildItems);
  348.  
  349.   nsresult CreatePseudoTableFrame(nsTableCreator&          aTableCreator,
  350.                                   nsFrameConstructorState& aState, 
  351.                                   nsIFrame*                aParentFrameIn = nsnull);
  352.  
  353.   nsresult CreatePseudoRowGroupFrame(nsTableCreator&          aTableCreator,
  354.                                      nsFrameConstructorState& aState, 
  355.                                      nsIFrame*                aParentFrameIn = nsnull);
  356.  
  357.   nsresult CreatePseudoColGroupFrame(nsTableCreator&          aTableCreator,
  358.                                      nsFrameConstructorState& aState, 
  359.                                      nsIFrame*                aParentFrameIn = nsnull);
  360.  
  361.   nsresult CreatePseudoRowFrame(nsTableCreator&          aTableCreator,
  362.                                 nsFrameConstructorState& aState, 
  363.                                 nsIFrame*                aParentFrameIn = nsnull);
  364.  
  365.   nsresult CreatePseudoCellFrame(nsTableCreator&          aTableCreator,
  366.                                  nsFrameConstructorState& aState, 
  367.                                  nsIFrame*                aParentFrameIn = nsnull);
  368.  
  369.   nsresult GetPseudoTableFrame(nsTableCreator&          aTableCreator,
  370.                                nsFrameConstructorState& aState, 
  371.                                nsIFrame&                aParentFrameIn);
  372.  
  373.   nsresult GetPseudoColGroupFrame(nsTableCreator&          aTableCreator,
  374.                                   nsFrameConstructorState& aState, 
  375.                                   nsIFrame&                aParentFrameIn);
  376.  
  377.   nsresult GetPseudoRowGroupFrame(nsTableCreator&          aTableCreator,
  378.                                   nsFrameConstructorState& aState, 
  379.                                   nsIFrame&                aParentFrameIn);
  380.  
  381.   nsresult GetPseudoRowFrame(nsTableCreator&          aTableCreator,
  382.                              nsFrameConstructorState& aState, 
  383.                              nsIFrame&                aParentFrameIn);
  384.  
  385.   nsresult GetPseudoCellFrame(nsTableCreator&          aTableCreator,
  386.                               nsFrameConstructorState& aState, 
  387.                               nsIFrame&                aParentFrameIn);
  388.  
  389.   nsresult GetParentFrame(nsTableCreator&          aTableCreator,
  390.                           nsIFrame&                aParentFrameIn, 
  391.                           nsIAtom*                 aChildFrameType, 
  392.                           nsFrameConstructorState& aState, 
  393.                           nsIFrame*&               aParentFrame,
  394.                           PRBool&                  aIsPseudoParent);
  395.  
  396.   /**
  397.    * Function to adjust aParentFrame and aFrameItems to deal with table
  398.    * pseudo-frames that may have to be inserted.
  399.    * @param aChildContent the content node we want to construct a frame for
  400.    * @param aChildDisplay the display struct for aChildContent
  401.    * @param aParentFrame the frame we think should be the parent.  This will be
  402.    *        adjusted to point to a pseudo-frame if needed.
  403.    * @param aTag tag that would be used for frame construction
  404.    * @param aNameSpaceID namespace that will be used for frame construction
  405.    * @param aFrameItems the framelist we think we need to put the child frame
  406.    *        into.  If we have to construct pseudo-frames, we'll modify the
  407.    *        pointer to point to the list the child frame should go into.
  408.    * @param aState the nsFrameConstructorState we're using.
  409.    * @param aSaveState the nsFrameConstructorSaveState we can use for pushing a
  410.    *        float containing block if we have to do it.
  411.    * @param aCreatedPseudo whether we had to create a pseudo-parent
  412.    * @return NS_OK on success, NS_ERROR_OUT_OF_MEMORY and such as needed.
  413.    */
  414.   // XXXbz this function should really go away once we rework pseudo-frame
  415.   // handling to be better. This should simply be part of the job of
  416.   // GetGeometricParent, and stuff like the frameitems and parent frame should
  417.   // be kept track of in the state...
  418.   nsresult AdjustParentFrame(nsIContent* aChildContent,
  419.                              const nsStyleDisplay* aChildDisplay,
  420.                              nsIAtom* aTag,
  421.                              PRInt32 aNameSpaceID,
  422.                              nsIFrame* & aParentFrame,
  423.                              nsFrameItems* & aFrameItems,
  424.                              nsFrameConstructorState& aState,
  425.                              nsFrameConstructorSaveState& aSaveState,
  426.                              PRBool& aCreatedPseudo);
  427.   
  428.   nsresult TableProcessChildren(nsFrameConstructorState& aState,
  429.                                 nsIContent*              aContent,
  430.                                 nsIFrame*                aParentFrame,
  431.                                 nsTableCreator&          aTableCreator,
  432.                                 nsFrameItems&            aChildItems,
  433.                                 nsIFrame*&               aCaption);
  434.  
  435.   nsresult TableProcessChild(nsFrameConstructorState& aState,
  436.                              nsIContent*              aChildContent,
  437.                              nsIContent*              aParentContent,
  438.                              nsIFrame*                aParentFrame,
  439.                              nsIAtom*                 aParentFrameType,
  440.                              nsStyleContext*          aParentStyleContext,
  441.                              nsTableCreator&          aTableCreator,
  442.                              nsFrameItems&            aChildItems,
  443.                              nsIFrame*&               aCaption);
  444.  
  445.   const nsStyleDisplay* GetDisplay(nsIFrame* aFrame);
  446.  
  447.   // END TABLE SECTION
  448.  
  449. protected:
  450.   static nsresult CreatePlaceholderFrameFor(nsIPresShell*    aPresShell, 
  451.                                             nsPresContext*  aPresContext,
  452.                                             nsFrameManager*  aFrameManager,
  453.                                             nsIContent*      aContent,
  454.                                             nsIFrame*        aFrame,
  455.                                             nsStyleContext*  aStyleContext,
  456.                                             nsIFrame*        aParentFrame,
  457.                                             nsIFrame**       aPlaceholderFrame);
  458.  
  459. private:
  460.   nsresult ConstructAlternateFrame(nsIContent*      aContent,
  461.                                    nsStyleContext*  aStyleContext,
  462.                                    nsIFrame*        aGeometricParent,
  463.                                    nsIFrame*        aContentParent,
  464.                                    nsIFrame*&       aFrame);
  465.  
  466.   // @param OUT aNewFrame the new radio control frame
  467.   nsresult ConstructRadioControlFrame(nsIFrame**         aNewFrame,
  468.                                       nsIContent*        aContent,
  469.                                       nsStyleContext*    aStyleContext);
  470.  
  471.   // @param OUT aNewFrame the new checkbox control frame
  472.   nsresult ConstructCheckboxControlFrame(nsIFrame**       aNewFrame,
  473.                                          nsIContent*      aContent,
  474.                                          nsStyleContext*  aStyleContext);
  475.  
  476.   // ConstructSelectFrame puts the new frame in aFrameItems and
  477.   // handles the kids of the select.
  478.   nsresult ConstructSelectFrame(nsFrameConstructorState& aState,
  479.                                 nsIContent*              aContent,
  480.                                 nsIFrame*                aParentFrame,
  481.                                 nsIAtom*                 aTag,
  482.                                 nsStyleContext*          aStyleContext,
  483.                                 nsIFrame*&               aNewFrame,
  484.                                 const nsStyleDisplay*    aStyleDisplay,
  485.                                 PRBool&                  aFrameHasBeenInitialized,
  486.                                 nsFrameItems&            aFrameItems);
  487.  
  488.   // ConstructFieldSetFrame puts the new frame in aFrameItems and
  489.   // handles the kids of the fieldset
  490.   nsresult ConstructFieldSetFrame(nsFrameConstructorState& aState,
  491.                                   nsIContent*              aContent,
  492.                                   nsIFrame*                aParentFrame,
  493.                                   nsIAtom*                 aTag,
  494.                                   nsStyleContext*          aStyleContext,
  495.                                   nsIFrame*&               aNewFrame,
  496.                                   nsFrameItems&            aFrameItems,
  497.                                   const nsStyleDisplay*    aStyleDisplay,
  498.                                   PRBool&                  aFrameHasBeenInitialized);
  499.  
  500.   nsresult ConstructTextFrame(nsFrameConstructorState& aState,
  501.                               nsIContent*              aContent,
  502.                               nsIFrame*                aParentFrame,
  503.                               nsStyleContext*          aStyleContext,
  504.                               nsFrameItems&            aFrameItems,
  505.                               PRBool                   aPseudoParent);
  506.  
  507.   nsresult ConstructPageBreakFrame(nsFrameConstructorState& aState,
  508.                                    nsIContent*              aContent,
  509.                                    nsIFrame*                aParentFrame,
  510.                                    nsStyleContext*          aStyleContext,
  511.                                    nsFrameItems&            aFrameItems);
  512.  
  513.   // Construct a page break frame if page-break-before:always is set in aStyleContext
  514.   // and add it to aFrameItems. Return true if page-break-after:always is set on aStyleContext.
  515.   // Don't do this for row groups, rows or cell, because tables handle those internally.
  516.   PRBool PageBreakBefore(nsFrameConstructorState& aState,
  517.                          nsIContent*              aContent,
  518.                          nsIFrame*                aParentFrame,
  519.                          nsStyleContext*          aStyleContext,
  520.                          nsFrameItems&            aFrameItems);
  521.  
  522.   nsresult ConstructHTMLFrame(nsFrameConstructorState& aState,
  523.                               nsIContent*              aContent,
  524.                               nsIFrame*                aParentFrame,
  525.                               nsIAtom*                 aTag,
  526.                               PRInt32                  aNameSpaceID,
  527.                               nsStyleContext*          aStyleContext,
  528.                               nsFrameItems&            aFrameItems,
  529.                               PRBool                   aHasPseudoParent);
  530.  
  531.   nsresult ConstructFrameInternal( nsFrameConstructorState& aState,
  532.                                    nsIContent*              aContent,
  533.                                    nsIFrame*                aParentFrame,
  534.                                    nsIAtom*                 aTag,
  535.                                    PRInt32                  aNameSpaceID,
  536.                                    nsStyleContext*          aStyleContext,
  537.                                    nsFrameItems&            aFrameItems,
  538.                                    PRBool                   aXBLBaseTag);
  539.  
  540.   nsresult CreateAnonymousFrames(nsIAtom*                 aTag,
  541.                                  nsFrameConstructorState& aState,
  542.                                  nsIContent*              aParent,
  543.                                  nsIFrame*                aNewFrame,
  544.                                  PRBool                   aAppendToExisting,
  545.                                  nsFrameItems&            aChildItems,
  546.                                  PRBool                   aIsRoot = PR_FALSE);
  547.  
  548.   nsresult CreateAnonymousFrames(nsFrameConstructorState& aState,
  549.                                  nsIContent*              aParent,
  550.                                  nsIDocument*             aDocument,
  551.                                  nsIFrame*                aNewFrame,
  552.                                  PRBool                   aForceBindingParent,
  553.                                  PRBool                   aAppendToExisting,
  554.                                  nsFrameItems&            aChildItems,
  555.                                  nsIFrame*                aAnonymousCreator,
  556.                                  nsIContent*              aInsertionNode,
  557.                                  PRBool                   aAnonymousParentIsBlock);
  558.  
  559. //MathML Mod - RBS
  560. #ifdef MOZ_MATHML
  561.   nsresult ConstructMathMLFrame(nsFrameConstructorState& aState,
  562.                                 nsIContent*              aContent,
  563.                                 nsIFrame*                aParentFrame,
  564.                                 nsIAtom*                 aTag,
  565.                                 PRInt32                  aNameSpaceID,
  566.                                 nsStyleContext*          aStyleContext,
  567.                                 nsFrameItems&            aFrameItems,
  568.                                 PRBool                   aHasPseudoParent);
  569. #endif
  570.  
  571.   nsresult ConstructXULFrame(nsFrameConstructorState& aState,
  572.                              nsIContent*              aContent,
  573.                              nsIFrame*                aParentFrame,
  574.                              nsIAtom*                 aTag,
  575.                              PRInt32                  aNameSpaceID,
  576.                              nsStyleContext*          aStyleContext,
  577.                              nsFrameItems&            aFrameItems,
  578.                              PRBool                   aXBLBaseTag,
  579.                              PRBool                   aHasPseudoParent,
  580.                              PRBool*                  aHaltProcessing);
  581.  
  582.  
  583. // XTF
  584. #ifdef MOZ_XTF
  585.   nsresult ConstructXTFFrame(nsFrameConstructorState& aState,
  586.                              nsIContent*              aContent,
  587.                              nsIFrame*                aParentFrame,
  588.                              nsIAtom*                 aTag,
  589.                              PRInt32                  aNameSpaceID,
  590.                              nsStyleContext*          aStyleContext,
  591.                              nsFrameItems&            aFrameItems,
  592.                              PRBool                   aHasPseudoParent);
  593. #endif
  594.  
  595. // SVG - rods
  596. #ifdef MOZ_SVG
  597.   nsresult TestSVGConditions(nsIContent* aContent,
  598.                              PRBool&     aHasRequiredExtensions,
  599.                              PRBool&     aHasRequiredFeatures,
  600.                              PRBool&     aHasSystemLanguage);
  601.  
  602.   nsresult SVGSwitchProcessChildren(nsFrameConstructorState& aState,
  603.                                     nsIContent*              aContent,
  604.                                     nsIFrame*                aFrame,
  605.                                     nsFrameItems&            aFrameItems);
  606.  
  607.   nsresult ConstructSVGFrame(nsFrameConstructorState& aState,
  608.                              nsIContent*              aContent,
  609.                              nsIFrame*                aParentFrame,
  610.                              nsIAtom*                 aTag,
  611.                              PRInt32                  aNameSpaceID,
  612.                              nsStyleContext*          aStyleContext,
  613.                              nsFrameItems&            aFrameItems,
  614.                              PRBool                   aHasPseudoParent,
  615.                              PRBool*                  aHaltProcessing);
  616. #endif
  617.  
  618.   nsresult ConstructFrameByDisplayType(nsFrameConstructorState& aState,
  619.                                        const nsStyleDisplay*    aDisplay,
  620.                                        nsIContent*              aContent,
  621.                                        PRInt32                  aNameSpaceID,
  622.                                        nsIAtom*                 aTag,
  623.                                        nsIFrame*                aParentFrame,
  624.                                        nsStyleContext*          aStyleContext,
  625.                                        nsFrameItems&            aFrameItems,
  626.                                        PRBool                   aHasPseudoParent);
  627.  
  628.   nsresult ProcessChildren(nsFrameConstructorState& aState,
  629.                            nsIContent*              aContent,
  630.                            nsIFrame*                aFrame,
  631.                            PRBool                   aCanHaveGeneratedContent,
  632.                            nsFrameItems&            aFrameItems,
  633.                            PRBool                   aParentIsBlock,
  634.                            nsTableCreator*          aTableCreator = nsnull);
  635.  
  636.   // @param OUT aFrame the newly created frame
  637.   nsresult CreateInputFrame(nsIContent*      aContent,
  638.                             nsIFrame**       aFrame,
  639.                             nsStyleContext*  aStyleContext);
  640.  
  641.   nsresult AddDummyFrameToSelect(nsFrameConstructorState& aState,
  642.                                  nsIFrame*                aListFrame,
  643.                                  nsIFrame*                aParentFrame,
  644.                                  nsFrameItems*            aChildItems,
  645.                                  nsIContent*              aContainer,
  646.                                  nsIDOMHTMLSelectElement* aSelectElement);
  647.  
  648.   nsresult RemoveDummyFrameFromSelect(nsIContent*               aContainer,
  649.                                       nsIContent*               aChild,
  650.                                       nsIDOMHTMLSelectElement*  aSelectElement);
  651.  
  652.   nsIFrame* GetFrameFor(nsIContent* aContent);
  653.  
  654.   nsIFrame* GetAbsoluteContainingBlock(nsIFrame* aFrame);
  655.  
  656.   nsIFrame* GetFloatContainingBlock(nsIFrame* aFrame);
  657.  
  658.   nsIContent* PropagateScrollToViewport();
  659.  
  660.   // Build a scroll frame: 
  661.   //  Calls BeginBuildingScrollFrame, InitAndRestoreFrame, and then FinishBuildingScrollFrame.
  662.   //  Sets the primary frame for the content to the output aNewFrame.
  663.   // @param aNewFrame the created scrollframe --- output only
  664.   nsresult
  665.   BuildScrollFrame(nsFrameConstructorState& aState,
  666.                    nsIContent*              aContent,
  667.                    nsStyleContext*          aContentStyle,
  668.                    nsIFrame*                aScrolledFrame,
  669.                    nsIFrame*                aParentFrame,
  670.                    nsIFrame*                aContentParentFrame,
  671.                    nsIFrame*&               aNewFrame,
  672.                    nsStyleContext*&         aScrolledChildStyle);
  673.  
  674.   // Builds the initial ScrollFrame
  675.   already_AddRefed<nsStyleContext>
  676.   BeginBuildingScrollFrame(nsFrameConstructorState& aState,
  677.                            nsIContent*              aContent,
  678.                            nsStyleContext*          aContentStyle,
  679.                            nsIFrame*                aParentFrame,
  680.                            nsIFrame*                aContentParentFrame,
  681.                            nsIAtom*                 aScrolledPseudo,
  682.                            PRBool                   aIsRoot,
  683.                            nsIFrame*&               aNewFrame);
  684.  
  685.   // Completes the building of the scrollframe:
  686.   // Creates a view for the scrolledframe and makes it the child of the scrollframe.
  687.   void
  688.   FinishBuildingScrollFrame(nsIFrame* aScrollFrame,
  689.                             nsIFrame* aScrolledFrame);
  690.  
  691.   // InitializeSelectFrame puts scrollFrame in aFrameItems if aBuildCombobox is false
  692.   nsresult
  693.   InitializeSelectFrame(nsFrameConstructorState& aState,
  694.                         nsIFrame*                scrollFrame,
  695.                         nsIFrame*                scrolledFrame,
  696.                         nsIContent*              aContent,
  697.                         nsIFrame*                aParentFrame,
  698.                         nsStyleContext*          aStyleContext,
  699.                         PRBool                   aBuildCombobox,
  700.                         nsFrameItems&            aFrameItems);
  701.  
  702.   nsresult MaybeRecreateFramesForContent(nsIContent*      aContent);
  703.  
  704.   nsresult RecreateFramesForContent(nsIContent*      aContent);
  705.  
  706.   PRBool MaybeRecreateContainerForIBSplitterFrame(nsIFrame* aFrame, nsresult* aResult);
  707.  
  708.   nsresult CreateContinuingOuterTableFrame(nsIPresShell*    aPresShell, 
  709.                                            nsPresContext*  aPresContext,
  710.                                            nsIFrame*        aFrame,
  711.                                            nsIFrame*        aParentFrame,
  712.                                            nsIContent*      aContent,
  713.                                            nsStyleContext*  aStyleContext,
  714.                                            nsIFrame**       aContinuingFrame);
  715.  
  716.   nsresult CreateContinuingTableFrame(nsIPresShell*    aPresShell, 
  717.                                       nsPresContext*  aPresContext,
  718.                                       nsIFrame*        aFrame,
  719.                                       nsIFrame*        aParentFrame,
  720.                                       nsIContent*      aContent,
  721.                                       nsStyleContext*  aStyleContext,
  722.                                       nsIFrame**       aContinuingFrame);
  723.  
  724.   //----------------------------------------
  725.  
  726.   // Methods support creating block frames and their children
  727.  
  728.   already_AddRefed<nsStyleContext>
  729.   GetFirstLetterStyle(nsIContent*      aContent,
  730.                       nsStyleContext*  aStyleContext);
  731.  
  732.   already_AddRefed<nsStyleContext>
  733.   GetFirstLineStyle(nsIContent*      aContent,
  734.                     nsStyleContext*  aStyleContext);
  735.  
  736.   PRBool HaveFirstLetterStyle(nsIContent*      aContent,
  737.                               nsStyleContext*  aStyleContext);
  738.  
  739.   PRBool HaveFirstLineStyle(nsIContent*      aContent,
  740.                             nsStyleContext*  aStyleContext);
  741.  
  742.   void HaveSpecialBlockStyle(nsIContent*      aContent,
  743.                              nsStyleContext*  aStyleContext,
  744.                              PRBool*          aHaveFirstLetterStyle,
  745.                              PRBool*          aHaveFirstLineStyle);
  746.  
  747.   // |aContentParentFrame| should be null if it's really the same as
  748.   // |aParentFrame|.
  749.   // @param aFrameItems where we want to put the block in case it's in-flow.
  750.   // @param aNewFrame an in/out parameter. On input it is the block to be
  751.   // constructed. On output it is reset to the outermost
  752.   // frame constructed (e.g. if we need to wrap the block in an
  753.   // nsColumnSetFrame.
  754.   // @param aParentFrame is the desired parent for the (possibly wrapped)
  755.   // block
  756.   // @param aContentParent is the parent the block would have if it
  757.   // were in-flow
  758.   nsresult ConstructBlock(nsFrameConstructorState& aState,
  759.                           const nsStyleDisplay*    aDisplay,
  760.                           nsIContent*              aContent,
  761.                           nsIFrame*                aParentFrame,
  762.                           nsIFrame*                aContentParentFrame,
  763.                           nsStyleContext*          aStyleContext,
  764.                           nsIFrame**               aNewFrame,
  765.                           nsFrameItems&            aFrameItems,
  766.                           PRBool                   aAbsPosContainer);
  767.  
  768.   nsresult ConstructInline(nsFrameConstructorState& aState,
  769.                            const nsStyleDisplay*    aDisplay,
  770.                            nsIContent*              aContent,
  771.                            nsIFrame*                aParentFrame,
  772.                            nsStyleContext*          aStyleContext,
  773.                            PRBool                   aIsPositioned,
  774.                            nsIFrame*                aNewFrame);
  775.  
  776.   nsresult ProcessInlineChildren(nsFrameConstructorState& aState,
  777.                                  nsIContent*              aContent,
  778.                                  nsIFrame*                aFrame,
  779.                                  PRBool                   aCanHaveGeneratedContent,
  780.                                  nsFrameItems&            aFrameItems,
  781.                                  PRBool*                  aKidsAllInline);
  782.  
  783.   PRBool AreAllKidsInline(nsIFrame* aFrameList);
  784.  
  785.   PRBool WipeContainingBlock(nsFrameConstructorState& aState,
  786.                              nsIFrame*                blockContent,
  787.                              nsIFrame*                aFrame,
  788.                              nsIFrame*                aFrameList);
  789.  
  790.   PRBool NeedSpecialFrameReframe(nsIContent*      aParent1,
  791.                                  nsIContent*      aParent2,
  792.                                  nsIFrame*&       aParentFrame,
  793.                                  nsIContent*      aChild,
  794.                                  PRInt32          aIndexInContainer,
  795.                                  nsIFrame*&       aPrevSibling,
  796.                                  nsIFrame*        aNextSibling);
  797.  
  798.   nsresult SplitToContainingBlock(nsFrameConstructorState& aState,
  799.                                   nsIFrame*                aFrame,
  800.                                   nsIFrame*                aLeftInlineChildFrame,
  801.                                   nsIFrame*                aBlockChildFrame,
  802.                                   nsIFrame*                aRightInlineChildFrame,
  803.                                   PRBool                   aTransfer);
  804.  
  805.   nsresult ReframeContainingBlock(nsIFrame* aFrame);
  806.  
  807.   nsresult StyleChangeReflow(nsIFrame* aFrame, nsIAtom* aAttribute);
  808.  
  809.   /** Helper function that searches the immediate child frames 
  810.     * (and their children if the frames are "special")
  811.     * for a frame that maps the specified content object
  812.     *
  813.     * @param aParentFrame   the primary frame for aParentContent
  814.     * @param aContent       the content node for which we seek a frame
  815.     * @param aParentContent the parent for aContent 
  816.     * @param aHint          an optional hint used to make the search for aFrame faster
  817.     */
  818.   nsIFrame* FindFrameWithContent(nsFrameManager*  aFrameManager,
  819.                                  nsIFrame*        aParentFrame,
  820.                                  nsIContent*      aParentContent,
  821.                                  nsIContent*      aContent,
  822.                                  nsFindFrameHint* aHint);
  823.  
  824.   //----------------------------------------
  825.  
  826.   // Methods support :first-letter style
  827.  
  828.   void CreateFloatingLetterFrame(nsFrameConstructorState& aState,
  829.                                  nsIContent*              aTextContent,
  830.                                  nsIFrame*                aTextFrame,
  831.                                  nsIContent*              aBlockContent,
  832.                                  nsIFrame*                aParentFrame,
  833.                                  nsStyleContext*          aStyleContext,
  834.                                  nsFrameItems&            aResult);
  835.  
  836.   nsresult CreateLetterFrame(nsFrameConstructorState& aState,
  837.                              nsIContent*              aTextContent,
  838.                              nsIFrame*                aParentFrame,
  839.                              nsFrameItems&            aResult);
  840.  
  841.   nsresult WrapFramesInFirstLetterFrame(nsFrameConstructorState& aState,
  842.                                         nsIContent*              aBlockContent,
  843.                                         nsIFrame*                aBlockFrame,
  844.                                         nsFrameItems&            aBlockFrames);
  845.  
  846.   nsresult WrapFramesInFirstLetterFrame(nsFrameConstructorState& aState,
  847.                                         nsIFrame*                aParentFrame,
  848.                                         nsIFrame*                aParentFrameList,
  849.                                         nsIFrame**               aModifiedParent,
  850.                                         nsIFrame**               aTextFrame,
  851.                                         nsIFrame**               aPrevFrame,
  852.                                         nsFrameItems&            aLetterFrame,
  853.                                         PRBool*                  aStopLooking);
  854.  
  855.   nsresult RecoverLetterFrames(nsFrameConstructorState& aState,
  856.                                nsIFrame*                aBlockFrame);
  857.  
  858.   // 
  859.   nsresult RemoveLetterFrames(nsPresContext*  aPresContext,
  860.                               nsIPresShell*    aPresShell,
  861.                               nsFrameManager*  aFrameManager,
  862.                               nsIFrame*        aBlockFrame);
  863.  
  864.   // Recursive helper for RemoveLetterFrames
  865.   nsresult RemoveFirstLetterFrames(nsPresContext*  aPresContext,
  866.                                    nsIPresShell*    aPresShell,
  867.                                    nsFrameManager*  aFrameManager,
  868.                                    nsIFrame*        aFrame,
  869.                                    PRBool*          aStopLooking);
  870.  
  871.   // Special remove method for those pesky floating first-letter frames
  872.   nsresult RemoveFloatingFirstLetterFrames(nsPresContext*  aPresContext,
  873.                                            nsIPresShell*    aPresShell,
  874.                                            nsFrameManager*  aFrameManager,
  875.                                            nsIFrame*        aBlockFrame,
  876.                                            PRBool*          aStopLooking);
  877.  
  878.   // Capture state for the frame tree rooted at the frame associated with the
  879.   // content object, aContent
  880.   nsresult CaptureStateForFramesOf(nsIContent* aContent,
  881.                                    nsILayoutHistoryState* aHistoryState);
  882.  
  883.   // Capture state for the frame tree rooted at aFrame.
  884.   nsresult CaptureStateFor(nsIFrame*              aFrame,
  885.                            nsILayoutHistoryState* aHistoryState);
  886.  
  887.   //----------------------------------------
  888.  
  889.   // Methods support :first-line style
  890.  
  891.   nsresult WrapFramesInFirstLineFrame(nsFrameConstructorState& aState,
  892.                                       nsIContent*              aContent,
  893.                                       nsIFrame*                aFrame,
  894.                                       nsFrameItems&            aFrameItems);
  895.  
  896.   nsresult AppendFirstLineFrames(nsFrameConstructorState& aState,
  897.                                  nsIContent*              aContent,
  898.                                  nsIFrame*                aBlockFrame,
  899.                                  nsFrameItems&            aFrameItems);
  900.  
  901.   nsresult InsertFirstLineFrames(nsFrameConstructorState& aState,
  902.                                  nsIContent*              aContent,
  903.                                  nsIFrame*                aBlockFrame,
  904.                                  nsIFrame**               aParentFrame,
  905.                                  nsIFrame*                aPrevSibling,
  906.                                  nsFrameItems&            aFrameItems);
  907.  
  908.   nsresult RemoveFixedItems(const nsFrameConstructorState& aState);
  909.  
  910.   // Find the ``rightmost'' frame for the content immediately preceding
  911.   // aIndexInContainer, following continuations if necessary. If aChild is
  912.   // not null, make sure it passes the call to IsValidSibling
  913.   nsIFrame* FindPreviousSibling(nsIContent*       aContainer,
  914.                                 nsIFrame*         aContainerFrame,
  915.                                 PRInt32           aIndexInContainer,
  916.                                 const nsIContent* aChild = nsnull);
  917.  
  918.   // Find the frame for the content node immediately following aIndexInContainer.
  919.   // If aChild is not null, make sure it passes the call to IsValidSibling
  920.   nsIFrame* FindNextSibling(nsIContent*       aContainer,
  921.                             nsIFrame*         aContainerFrame,
  922.                             PRInt32           aIndexInContainer,
  923.                             const nsIContent* aChild = nsnull);
  924.  
  925.   // see if aContent and aSibling are legitimate siblings due to restrictions
  926.   // imposed by table columns
  927.   PRBool IsValidSibling(nsIFrame*              aParentFrame,
  928.                         const nsIFrame&        aSibling,
  929.                         PRUint8                aSiblingDisplay,
  930.                         nsIContent&            aContent,
  931.                         PRUint8&               aDisplay);
  932.  
  933.   void QuotesDirty() {
  934.     if (mUpdateCount != 0)
  935.       mQuotesDirty = PR_TRUE;
  936.     else
  937.       mQuoteList.RecalcAll();
  938.   }
  939.  
  940.   void CountersDirty() {
  941.     if (mUpdateCount != 0)
  942.       mCountersDirty = PR_TRUE;
  943.     else
  944.       mCounterManager.RecalcAll();
  945.   }
  946.  
  947.   inline NS_HIDDEN_(nsresult)
  948.     CreateInsertionPointChildren(nsFrameConstructorState &aState,
  949.                                  nsIFrame *aNewFrame,
  950.                                  nsIContent *aContent,
  951.                                  PRBool aUseInsertionFrame = PR_TRUE);
  952.  
  953.   NS_HIDDEN_(nsresult)
  954.     CreateInsertionPointChildren(nsFrameConstructorState &aState,
  955.                                  nsIFrame *aNewFrame,
  956.                                  PRBool aUseInsertionFrame);
  957.                                  
  958. public:
  959.   struct RestyleData;
  960.   friend struct RestyleData;
  961.  
  962.   struct RestyleData {
  963.     nsReStyleHint mRestyleHint;  // What we want to restyle
  964.     nsChangeHint  mChangeHint;   // The minimal change hint for "self"
  965.   };
  966.  
  967.   struct RestyleEnumerateData : public RestyleData {
  968.     nsCOMPtr<nsIContent> mContent;
  969.   };
  970.  
  971.   struct RestyleEvent;
  972.   friend struct RestyleEvent;
  973.  
  974.   struct RestyleEvent : public PLEvent {
  975.     RestyleEvent(nsCSSFrameConstructor* aConstructor);
  976.     ~RestyleEvent() { }
  977.     void HandleEvent();
  978.   };
  979.  
  980.   friend class nsFrameConstructorState;
  981.  
  982. protected:
  983.   nsCOMPtr<nsIEventQueue>        mRestyleEventQueue;
  984.   
  985. private:
  986. #ifdef ACCESSIBILITY
  987.   // If the frame is visible, return the frame type
  988.   // If the frame is invisible, return nsnull
  989.   nsIAtom *GetRenderedFrameType(nsIFrame *aFrame);
  990.   
  991.   // Using the rendered frame type from GetRenderedFrameType(), which is nsnull
  992.   // for invisible frames, compare the previous rendering and new rendering, to
  993.   // determine if the tree of accessibility objects may change. If it might,
  994.   // notify the accessibility module of the change, and whether it is a generic
  995.   // change, something is being made visible or something is being made hidden.
  996.   void NotifyAccessibleChange(nsIAtom *aPreviousFrameType, nsIAtom *aFrameType,
  997.                               nsIContent *aContent);
  998. #endif
  999.  
  1000.   nsIDocument*        mDocument;  // Weak ref
  1001.   nsIPresShell*       mPresShell; // Weak ref
  1002.  
  1003.   nsIFrame*           mInitialContainingBlock;
  1004.   nsIFrame*           mFixedContainingBlock;
  1005.   nsIFrame*           mDocElementContainingBlock;
  1006.   nsIFrame*           mGfxScrollFrame;
  1007.   nsIFrame*           mPageSequenceFrame;
  1008.   nsQuoteList         mQuoteList;
  1009.   nsCounterManager    mCounterManager;
  1010.   PRUint16            mUpdateCount;
  1011.   PRPackedBool        mQuotesDirty;
  1012.   PRPackedBool        mCountersDirty;
  1013.  
  1014.   nsCOMPtr<nsILayoutHistoryState> mTempFrameTreeState;
  1015.  
  1016.   nsCOMPtr<nsIEventQueueService> mEventQueueService;
  1017.  
  1018.   nsDataHashtable<nsISupportsHashKey, RestyleData> mPendingRestyles;
  1019.  
  1020.   static nsIXBLService * gXBLService;
  1021. };
  1022.  
  1023. #endif /* nsCSSFrameConstructor_h___ */
  1024.